package com.tianruan.psychological.moduls.sys.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tianruan.psychological.moduls.sys.user.entry.db.UserDO;
import com.tianruan.psychological.moduls.sys.user.entry.dto.UserDTO;
import com.tianruan.psychological.moduls.sys.user.entry.vo.UserVO;
import org.apache.ibatis.annotations.Param;

/**
 * @author liuxin
 * @date 2019/9/7
 */
public interface UserMapper extends BaseMapper<UserDO> {

    UserDTO getUserPermissionByNo(@Param("username") String username);

    UserVO getUserRoleById(@Param("id") String id);


    IPage<UserVO> pageUser(Page page,
                          @Param("no") String no,
                          @Param("username")String username,
                          @Param("phone")String phone,
                          @Param("email")String email,
                          @Param("role")String role);

    /**
     * 根据id获取密码
     * @param id
     * @return
     */
    String getPassword(@Param("id") String id);

}
